package com.garden;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@SpringBootApplication(scanBasePackages = "com.garden")
//@MapperScan({"com.garden.**.mapper"})
@RestController
public class SpringbootApplication {

	@GetMapping("/index")
	public String test(HttpServletRequest request){
		String host= request.getHeader("x-forwarded-host");
		return host + " -- SpirngBoot成功连接！";
	}

	public static void main(String[] args) {
		SpringApplication.run(SpringbootApplication.class, args);
	}

}
